var searchv = new Vue({
	el: "#app",
	data:{
		getsearch:'',
		history:[],
	},
	computed:{
		
	},
	watch:{
		
	},
	created:function(){
		this.history = s5.store.get("SX_SEARCH") || [];
	},
	mounted: function() {
	},
	methods:{
		search(){
			let index = this.history.indexOf(this.getsearch)
			if (index < 0) {
				if(this.getsearch != ''){
					this.history.push(this.getsearch);
					s5.store.set("SX_SEARCH", this.history)
				}
			}
			var getUrl = encodeURI("store-result.html?key_word="+this.getsearch);
			window.location.href = getUrl
		},
		hisHistory() {
			this.history = [];
			s5.store.del("SX_SEARCH")
		},
		toGoodsDetail(key_word){
			var getUrl = encodeURI("store-result.html?key_word="+key_word);
			window.location.href = getUrl
		}
	}
})